package com.linkstec.dameng;

import java.sql.DriverManager;
import java.sql.SQLException;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class DmJdbcTest {
	private static final Logger logger = LogManager.getLogger();

	public static void main(String[] args) {
		try {
			Class.forName("dm.jdbc.driver.DmDriver");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
		String url = "jdbc:dm://192.168.10.199:5236";
		// 加载驱动程序
		// 主库 IP = 223.254.254.19
		String userID = "SYSDBA";
		String passwd = "SYSDBA";
		try {
			DriverManager.getConnection(url, userID, passwd);
			logger.info("连接成功");
		} catch (SQLException e) {
			logger.error("", e);
		}

	}

}